package com.xinyu.vo;

public class LessonPermissionDecision {

    private final boolean allowed;
    private final String denyReason;

    private LessonPermissionDecision(boolean allowed, String denyReason) {
        this.allowed = allowed;
        this.denyReason = denyReason;
    }

    public static LessonPermissionDecision allow() {
        return new LessonPermissionDecision(true, null);
    }

    public static LessonPermissionDecision deny(String reason) {
        return new LessonPermissionDecision(false, reason);
    }

    public boolean isAllowed() {
        return allowed;
    }

    public String getDenyReason() {
        return denyReason;
    }
}
